<template>
	<div ref="popupMask" class="popup-mask" :class="[{'is-round': config.round.value === 'yes'}]" v-show="cdata.visible">
		<img :src="emptySrc" class="popup-content"/>
		<div class="popup-close" @click="hide"></div>
	</div>
</template>

<script type="text/ecmascript-6">
	import Mixin from '../mixin';
	export default {
		name: 'popup',
		mixins: [Mixin],
		data() {
			return {
				emptySrc: ""
			};
		},
		computed: {},
		methods: {
			hide() {
				this.cdata.visible = false;
			}
		},
		mounted() {
//			console.log();
//			console.log(this.config);
		}
	};
</script>

<style scoped>

	.popup-mask {
		position: fixed;
		/*position: absolute;*/
		z-index: 997;
		left: 0;
		top: 0;
		bottom: 0;
		right: 0;
		width: 100%;
		height: 100%;
		background-color: rgba(0, 0, 0, .7);
	}

	.popup-mask .popup-content {
		display: block;
		margin: 1rem auto;
		width: 80%;
		height: 7rem;
	}

	.is-round .popup-content {
		border-radius: .2rem;
	}

	.popup-mask .popup-close {
		width: .7rem;
		height: .7rem;
		margin: 0rem auto;
		background-image: url();
		background-size: 100% 100%;
	}

</style>